#include<iostream>
using namespace std;
class CPolugon {
protected:
	int width, height;
public:
	void setValues (int a, int b);

};
void CPolugon::setValues (int a, int b) {
	width=a;
	height=b;
}
class Crectangle: public CPolugon {
public:
	int area ();
};
int Crectangle::area() {
	return (width*height);
}
class CTriangle: public CPolugon {
public:
	int area ();
};

int CTriangle::area(){
	return (width*height/2);
}
	int main(){
		Crectangle rect;
		CTriangle trgl;
		rect.setValues (4,5);
		trgl.setValues (4,5);
		cout<<rect.area()<<endl;
		cout<<rect.area()<<endl;
		return 0;

	}

